		<!-- start content -->
		<div id="content">
			<div class="post">
				<!--<h1 class="title">Search results for <?php print $ts ?>:</h1>-->
				<div class="entry">
				
<?php
session_cache_limiter('private, must-revalidate');
session_start();
include 'std_dbs.php';

//text is in search and submitted
$searchstr = strtoupper(addslashes($_POST['searchMovieString']));

if (($searchstr == 'ALL') || ($searchstr == '')) {
	print '<h1 class="title">Search results for all movies:</h1>';
	$searchquery = "SELECT ImgCover, MovTitle FROM Movies WHERE PendStatus = 0 ORDER BY MOVTITLE ASC";
}
else {
	print "<h1 class='title'>Search results for ".$_POST['searchMovieString'].":</h1><br />";
	$searchquery = "SELECT IMGCOVER, MOVTITLE FROM MOVIES WHERE upper(MOVTITLE) LIKE '%".$searchstr."%' AND PendStatus = 0 ORDER BY MOVTITLE ASC";
}
print "<hr />";
$searchresults = oci_parse($connect, $searchquery);
oci_execute($searchresults);

$count = 0;
echo "<table width='90%' style='text-align:center'><tr>";
while($row = oci_fetch_array($searchresults, OCI_NUM)){
if (!isset($row[0]))//change default on insertion to this if nothing is entered
	$row[0] = 'default.jpg';

echo "<td class='mresults'>";
print "<a href='movies.php?movie=".$row[1]."'><img src=content/covers/".$row[0]." alt=".$row[1]." width=100 height=125 /><br />";//image
print $row[1]."</a><br />";//title
//print '<br />';
echo "</td>";
$count++;

if($count == 3)
{
	echo "</tr><tr>";
	$count=0;
}

}
echo "</tr></table>";
//Free result set
oci_free_statement($stid);
//Close database connection
oci_close($connect);

?>

					<!--<p class="links"><a href="#" class="more">Read More</a></p>-->
				</div>
			</div>
		</div>
		<!-- end content -->
